package com.yjd.comm.funds.enums;

/**
 * Created by yjd-wap on 2017/9/20.
 */
public enum FundsTypeEnum {

    UNKNOWN(0, "未知"),
    RECH(1, "充值"),
    CASH(2, "提现"),
    FIRST_PAY(3,"首付"),
    REPAYMENT(4,"还款"),
    OVERDUE(5,"罚息"),
    REFUND(6,"退款"),
    MANAGE(7,"管理费");

    private int code;
    private String label;

    public static FundsTypeEnum parse(int code){
        for (FundsTypeEnum fundsTypeEnum : FundsTypeEnum.values()) {
            if(fundsTypeEnum.getCode() == code){
                return fundsTypeEnum;
            }
        }
        return null;
    }

    private FundsTypeEnum(int code, String label) {
        this.code = code;
        this.label = label;
    }

    public int getCode() {
        return code;
    }
    public void setCode(int code) {
        this.code = code;
    }
    public String getLabel() {
        return label;
    }
    public void setLabel(String label) {
        this.label = label;
    }
}
